﻿
function __getUserName(username){	 
        for (var onec in allUser){        	   
        	   if (onec==username){        	   	
                  	try{
                  	  return allUser[onec].name;
                    }catch(e){}
        	   }             
        }
        return username;
   }
function __getUserNameById(userid){	 
        for (var onec in allUser){        	   

        	   if (allUser[onec].id==id){        	   	
                  	try{
                  	  return allUser[onec].name;
                    }catch(e){}
        	   }             
        }
        return username;
   }

  function __getUserNames(usernames){ 
  	   //return usernames;   
       return __getUserNamesBySplit(usernames,',');
  }
  function __getUserNamesBySplit(usernames,split){
  	   if (usernames==null||usernames=='') return '';
       var splitusernames=usernames.split(split);
       var values;       
       for (i=0;i<splitusernames.length;i++){
       	   try{       	   	
       	   	 
             if (i>0)
               values=values+split+__getUserName(splitusernames[i]);  
             else values=__getUserName(splitusernames[i]);  
             	
          }catch(e){}
       }
       return values
  }
